﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Configuration;

using MySql;
using MySql.Data;
using MySql.Data.MySqlClient;

namespace doris.Admin {
    public partial class MailConfig : System.Web.UI.Page {
        protected void Page_Load(object sender, EventArgs e) {
        /*    MySqlConnection conn = new MySqlConnection(WebConfigurationManager.ConnectionStrings["localConnectionString"].ConnectionString);
            MySqlCommand cmd = new MySqlCommand();
            cmd.Connection = conn;

            cmd.CommandText = "getAllPop3";
            cmd.CommandType = CommandType.StoredProcedure;

            //cmd.Parameters.AddWithValue("@out_configurationmailid", MySqlDbType.Int32);
//            cmd.Parameters["@out_configurationmailid"].Direction = ParameterDirection.Output;

      //      cmd.Parameters.AddWithValue("@out_connectionname", MySqlDbType.VarChar);
      //      cmd.Parameters["@out_connectionname"].Direction = ParameterDirection.Output;

  //          cmd.ExecuteNonQuery();
//            doris.Username = cmd.Parameters["@out_configurationmailid"].Value.ToString();

            try {
                conn.Open();
//                cmd.ExecuteNonQuery();

                MySqlDataReader reader = cmd.ExecuteReader();
//                int rownr = 1;
//                while (reader.Read()) {
//                   Debug.WriteLine("Row {0}: {1} {2}",(rownr++),reader["data_configurationmailid"],reader["data_connectionname"]);
//                }
                GridView1.DataSource = reader;
                GridView1.DataBind();
            } finally {
                conn.Close();
            }*/
        }

        protected void SqlDataSource1_Deleting(object sender, SqlDataSourceCommandEventArgs e) {
            e.Command.Parameters["@in_configurationmailid"].Value = e.Command.Parameters["@ConfigurationMailID"].Value;
            e.Command.Parameters.Remove(e.Command.Parameters["@ConfigurationMailID"]);
        }
    }
}